import {Component} from 'react';
import './index.less'
import Lazyimg from 'react-lazyimg-component';
import loadingImg from '../../../assets/loading.png'
class Menus extends Component{
    render(){
        return(
            <div className="menus">
                {
                    this.props.menus.map((item,index)=>{
                        return (
                            <div className="item" key={index}>
                            <Lazyimg className="lazy_img" src={item.pic} placeholder={<img src={loadingImg} alt='加载失败'/>}/>
                            <div>
                            {item.name} 
                            </div>
                          </div>
                        )
                    })
                }
          </div>
        )
    }
}
export default Menus;